#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

string s[100];

int main()
{
    int n = 0;
    while (cin >> s[n])
        n++;
    for (int i = n - 1; i >= 0; i--)
    {
        cout << s[i] << ' ';
    }
    return 0;
}